package com.hainatong.shiphelper.module.warehouse.entity;


import com.chad.library.adapter.base.entity.node.BaseExpandNode;
import com.chad.library.adapter.base.entity.node.BaseNode;

import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.List;

public class WareShelfBean extends BaseExpandNode
{

    /**
     * shelfName : string
     * floors : string
     * children : [{"uuid":"string","code":"string"}]
     */

    private String shelfName;
    private String floors;
    private List<ChildrenBean> children;

    public String getShelfName() {
        return shelfName;
    }

    public void setShelfName(String shelfName) {
        this.shelfName = shelfName;
    }

    public String getFloors() {
        return floors;
    }

    public void setFloors(String floors) {
        this.floors = floors;
    }

    public List<ChildrenBean> getChildren() {
        return children;
    }

    public void setChildren(List<ChildrenBean> children) {
        this.children = children;
    }


    @Nullable
    @Override
    public List<BaseNode> getChildNode()
    {
        List<BaseNode> childNode = new ArrayList<>();
        if (children == null )
        {
            return null;
        }
        if( children != null    )
        {
           for(ChildrenBean child : children  )
           {
               childNode.add(child);
           }
        }
        return childNode;
    }

    public static class ChildrenBean extends BaseNode
    {
        /**
         * uuid : string
         * code : string
         */

        private String uuid;
        private String code;

        public String getUuid() {
            return uuid;
        }

        public void setUuid(String uuid) {
            this.uuid = uuid;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        @Nullable
        @Override
        public List<BaseNode> getChildNode()
        {
            return null;
        }
    }
}
